package de.gwtprime.client.event;

import com.google.gwt.event.shared.GwtEvent;

import de.gwtprime.client.event.handler.VoteQuestionLoadedEventHandler;
import de.gwtprime.shared.requestFactory.VoteQuestionProxy;

public class VoteQuestionLoadedEvent extends GwtEvent<VoteQuestionLoadedEventHandler>{

public static Type<VoteQuestionLoadedEventHandler> TYPE = new Type<VoteQuestionLoadedEventHandler>();
	
	private VoteQuestionProxy vote;
	public VoteQuestionLoadedEvent(VoteQuestionProxy votes){
		this.setVote(votes);
	}
	
	@Override
	public Type<VoteQuestionLoadedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(VoteQuestionLoadedEventHandler handler) {
		handler.onVotesLoaded(this);
		
	}

	public VoteQuestionProxy getVote() {
		return vote;
	}

	public void setVote(VoteQuestionProxy vote) {
		this.vote = vote;
	}


}
